import matplotlib.pyplot as plt
import pandas as pd
import time

df_pkcs = pd.read_csv("cipher_pkcs.csv", encoding='utf-8')
x_pkcs = df_pkcs["count"].values
y_pkcs = df_pkcs["time"].values

df_oaep = pd.read_csv("cipher_oaep.csv", encoding='utf-8')
x_oaep = df_oaep["count"].values
y_oaep = df_oaep["time"].values

#开始画图

plt.title('Comparison of pkcs and oaep in cipher')

plt.plot(x_pkcs, y_pkcs, color='green', label='pkcs time')
plt.plot(x_oaep, y_oaep, color='red', label='oaep time')

plt.legend() # 显示图例

plt.xlabel('Message length')
plt.ylabel('Time required')
plt.show()
